import request from '@/utils/request'

// export function pageTeacher(current, limit, teacherQuery) {
//   return request({
//     url: `edu-teacher/pageList/${current}/${limit}`,
//     method: 'get',
//     data: teacherQuery
//   })
// }
const api_name = '/edu-teacher'
export default {

  getPageList(page, limit, teacherQuery) {
    return request({
      url: `${api_name}/${page}/${limit}`,
      method: 'post',
      data: teacherQuery
    })
  },
  removeById(removeById) {
    return request({
      url: `${api_name}/${removeById}`,
      method: 'delete'
    })
  },
  save(teacher) {
    return request({
      url: `${api_name}/addTeacher`,
      method: 'post',
      data: teacher
    })
  },
  //根据id查询讲师
  getById(id) {
    return request({
      url: `${api_name}/getTeacher/${id}`,
      method: 'get'
    })
  },
//  根据id修改讲师
updateById(teacher) {
  return request({
    url: `${api_name}/updateTeacher`,
    method: 'post',
    data: teacher
  })
}

}
